<template>
  <div>
    <div >
      <p class="el-descriptions__title">客户等级</p>
      <el-divider />
      <el-descriptions class="leveDiv" border>
        <el-descriptions-item
          v-for="(item, index) in levesItems"
          :key="index"
          :label="item.label"
        >
          <el-link v-if="item.isLink">查看详情</el-link>
          <span v-else>{{ valueObj[item.tipsCode] }}</span>
        </el-descriptions-item>
      </el-descriptions>
    </div>
    <div>
      <p class="el-descriptions__title btnTitleTips"> 
        <span class="btnTitleTips">价值信息 <el-link @click="assetsLinkClick" style="margin-left: 10px;" type="primary" v-show="radio1=='表'"> 推荐配置比例> </el-link> </span> 
        <el-radio-group v-model="radio1" size="small">
          <el-radio-button label="表" />
          <el-radio-button label="图" />
        </el-radio-group>
      </p>
      <el-divider />
      <chartValueInfo v-show="radio1=='图'"></chartValueInfo>
      <tableValueInfo v-show="radio1=='表'"></tableValueInfo>
      <assetsDispositionDrawer ref="refDispositionDrawer"></assetsDispositionDrawer>
    </div>
  </div>
</template>
<script setup> 
import chartValueInfo from './valueChild/chartValueInfo.vue'
import tableValueInfo from './valueChild/tableValueInfo.vue'
import assetsDispositionDrawer from './valueChild/assetsDispositionDrawer.vue'
// export default {
  {
    chartValueInfo,
    tableValueInfo,
    assetsDispositionDrawer
  }
  // setup() {
    const levesItems = ref([
      {label:'客户等级',tipsCode:'leve'},
      {label:'当前系统评级',tipsCode:'leveNow'},
      {label:'特殊认定评级',tipsCode:'leveTS'},
      {label:'评估时间',tipsCode:'leveTime'},
      {label:'是否高粘度',tipsCode:'isHight'},
      {label:'客户历史等级信息',tipsCode:'leveHis',isLink:true},
    ])
    const valueObj = ref({
      leve:'砖石客户',leveNow:'砖石客户1',leveTS:'黄金客户',leveTime:'2019-10-12',isHight:'1',leveHis:'111',
    })
    const radio1 =  ref('图')
    const refDispositionDrawer = ref(null)
    const assetsLinkClick = ()=>{
      refDispositionDrawer.value.show();
    }
    // return {
    //   levesItems,
    //   valueObj,
    //   radio1,
    //   assetsLinkClick
    // }
  // },
  // mounted() {

  // },
// };
</script>

<style lang="scss" scoped>
.leveDiv{
  padding: 10px 0;
}
.btnTitleTips{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
</style>
